package cheme.ProcessModel.Annotations;

import org.eclipse.jface.resource.ImageDescriptor;

import cheme.ProcessModel.AbstractModelElement;
import cheme.ProcessModel.IModelElement;
import cheme.ProcessModel.Visitors.IModelVisitor;
import cheme.ProcessModel.Visitors.IVisitor;

public class Annotation extends AbstractModelElement implements IAnnotation
{
	/*
	 * Serialization version identifier. (Set to default for now)
	 */
	
	private static final long serialVersionUID = 1L;
	
	String toolTipText = null;
	ImageDescriptor imageDescriptor = null;
	String index = null;
	
	public Annotation(IModelElement parent, ImageDescriptor imageDescriptor, String toolTipText)
	{
		super(parent);
		
		setToolTipText(toolTipText);
		setImageDescriptor(imageDescriptor);
		setIndex("");
	}
	public Annotation(IModelElement parent, ImageDescriptor imageDescriptor, String toolTipText, String counter)
	{
		super(parent);
		
		setToolTipText(toolTipText);
		setImageDescriptor(imageDescriptor);
		setIndex(counter);
	}
	
	public String getToolTipText()
	{
		return toolTipText;
	}

	public void setToolTipText(String toolTipText)
	{
		this.toolTipText = toolTipText;
	}

	public ImageDescriptor getImageDescriptor()
	{
		return imageDescriptor;
	}

	public void setImageDescriptor(ImageDescriptor imageDescriptor)
	{
		this.imageDescriptor = imageDescriptor;
	
	}
	
	public Object accept(IModelVisitor visitor)
	{
		visitor.visit(this);
		
		return IVisitor.NullReturn;
	}
	public void setIndex(String index)
	{
		this.index = index;
	}
	
	public String getIndex()
	{
		return index;
	}
	
}
